How to get @@error and @@rowcount at the same time?
2790
11-May-2011
Updated on 18-Sep-2020
Anonymous User
11-May-2011And if @@Recordcount is checked before the error-checking statement then @@Error would get reset. To get @@error and @@rowcount at the same time do both in same statement and store them in local variable. SELECT @RC = @@ROWCOUNT, @ER = @@ERROR